public class switchExample {
    public static void main(String[] args) {
        int n = 9;
        switch (n) {
            case 1:
                System.out.println("1");
                break;
            case 2:
                System.out.println("2");
                break;
            case 3:
                System.out.println("3");
                break;
            default:
                System.out.println("没有找到匹配的数字");
        }
    }
}
